/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.skali.cabdirectories.model.impl;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.json.JSON;
import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ProxyUtil;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.kernel.util.StringPool;
import com.liferay.portal.model.CacheModel;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.service.ServiceContext;

import com.liferay.portlet.expando.model.ExpandoBridge;
import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;

import com.skali.cabdirectories.model.CABDirectories_Metadata;
import com.skali.cabdirectories.model.CABDirectories_MetadataModel;
import com.skali.cabdirectories.model.CABDirectories_MetadataSoap;

import java.io.Serializable;

import java.sql.Types;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * The base model implementation for the CABDirectories_Metadata service. Represents a row in the &quot;CABDirectories_CABDirectories_Metadata&quot; database table, with each column mapped to a property of this class.
 *
 * <p>
 * This implementation and its corresponding interface {@link com.skali.cabdirectories.model.CABDirectories_MetadataModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link CABDirectories_MetadataImpl}.
 * </p>
 *
 * @author Prabhakar
 * @see CABDirectories_MetadataImpl
 * @see com.skali.cabdirectories.model.CABDirectories_Metadata
 * @see com.skali.cabdirectories.model.CABDirectories_MetadataModel
 * @generated
 */
@JSON(strict = true)
public class CABDirectories_MetadataModelImpl extends BaseModelImpl<CABDirectories_Metadata>
	implements CABDirectories_MetadataModel {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this class directly. All methods that expect a c a b directories_ metadata model instance should use the {@link com.skali.cabdirectories.model.CABDirectories_Metadata} interface instead.
	 */
	public static final String TABLE_NAME = "CABDirectories_CABDirectories_Metadata";
	public static final Object[][] TABLE_COLUMNS = {
			{ "SammNo", Types.BIGINT },
			{ "OrganizationName", Types.VARCHAR },
			{ "Field", Types.VARCHAR },
			{ "type_", Types.VARCHAR },
			{ "Program", Types.VARCHAR },
			{ "Status", Types.VARCHAR },
			{ "SubStatus", Types.VARCHAR },
			{ "Address", Types.VARCHAR },
			{ "Contact", Types.VARCHAR },
			{ "Tel", Types.BIGINT },
			{ "Fax", Types.BIGINT },
			{ "Email", Types.VARCHAR },
			{ "Website", Types.VARCHAR },
			{ "scope", Types.VARCHAR },
			{ "OfficerInCharge", Types.VARCHAR },
			{ "TelephoneNo", Types.BIGINT },
			{ "EmailOfficeIncharge", Types.VARCHAR },
			{ "StandardsUsed", Types.VARCHAR }
		};
	public static final String TABLE_SQL_CREATE = "create table CABDirectories_CABDirectories_Metadata (SammNo LONG not null primary key,OrganizationName VARCHAR(75) null,Field VARCHAR(75) null,type_ VARCHAR(75) null,Program VARCHAR(75) null,Status VARCHAR(75) null,SubStatus VARCHAR(75) null,Address VARCHAR(75) null,Contact VARCHAR(75) null,Tel LONG,Fax LONG,Email VARCHAR(75) null,Website VARCHAR(75) null,scope VARCHAR(75) null,OfficerInCharge VARCHAR(75) null,TelephoneNo LONG,EmailOfficeIncharge VARCHAR(75) null,StandardsUsed VARCHAR(75) null)";
	public static final String TABLE_SQL_DROP = "drop table CABDirectories_CABDirectories_Metadata";
	public static final String DATA_SOURCE = "liferayDataSource";
	public static final String SESSION_FACTORY = "liferaySessionFactory";
	public static final String TX_MANAGER = "liferayTransactionManager";
	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.entity.cache.enabled.com.skali.cabdirectories.model.CABDirectories_Metadata"),
			true);
	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.finder.cache.enabled.com.skali.cabdirectories.model.CABDirectories_Metadata"),
			true);
	public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
				"value.object.column.bitmask.enabled.com.skali.cabdirectories.model.CABDirectories_Metadata"),
			true);
	public static long FIELD_COLUMN_BITMASK = 1L;
	public static long ORGANIZATIONNAME_COLUMN_BITMASK = 2L;

	/**
	 * Converts the soap model instance into a normal model instance.
	 *
	 * @param soapModel the soap model instance to convert
	 * @return the normal model instance
	 */
	public static CABDirectories_Metadata toModel(
		CABDirectories_MetadataSoap soapModel) {
		if (soapModel == null) {
			return null;
		}

		CABDirectories_Metadata model = new CABDirectories_MetadataImpl();

		model.setSammNo(soapModel.getSammNo());
		model.setOrganizationName(soapModel.getOrganizationName());
		model.setField(soapModel.getField());
		model.setType_(soapModel.getType_());
		model.setProgram(soapModel.getProgram());
		model.setStatus(soapModel.getStatus());
		model.setSubStatus(soapModel.getSubStatus());
		model.setAddress(soapModel.getAddress());
		model.setContact(soapModel.getContact());
		model.setTel(soapModel.getTel());
		model.setFax(soapModel.getFax());
		model.setEmail(soapModel.getEmail());
		model.setWebsite(soapModel.getWebsite());
		model.setScope(soapModel.getScope());
		model.setOfficerInCharge(soapModel.getOfficerInCharge());
		model.setTelephoneNo(soapModel.getTelephoneNo());
		model.setEmailOfficeIncharge(soapModel.getEmailOfficeIncharge());
		model.setStandardsUsed(soapModel.getStandardsUsed());

		return model;
	}

	/**
	 * Converts the soap model instances into normal model instances.
	 *
	 * @param soapModels the soap model instances to convert
	 * @return the normal model instances
	 */
	public static List<CABDirectories_Metadata> toModels(
		CABDirectories_MetadataSoap[] soapModels) {
		if (soapModels == null) {
			return null;
		}

		List<CABDirectories_Metadata> models = new ArrayList<CABDirectories_Metadata>(soapModels.length);

		for (CABDirectories_MetadataSoap soapModel : soapModels) {
			models.add(toModel(soapModel));
		}

		return models;
	}

	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
				"lock.expiration.time.com.skali.cabdirectories.model.CABDirectories_Metadata"));

	public CABDirectories_MetadataModelImpl() {
	}

	public long getPrimaryKey() {
		return _SammNo;
	}

	public void setPrimaryKey(long primaryKey) {
		setSammNo(primaryKey);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_SammNo);
	}

	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
		setPrimaryKey(((Long)primaryKeyObj).longValue());
	}

	public Class<?> getModelClass() {
		return CABDirectories_Metadata.class;
	}

	public String getModelClassName() {
		return CABDirectories_Metadata.class.getName();
	}

	@Override
	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("SammNo", getSammNo());
		attributes.put("OrganizationName", getOrganizationName());
		attributes.put("Field", getField());
		attributes.put("type_", getType_());
		attributes.put("Program", getProgram());
		attributes.put("Status", getStatus());
		attributes.put("SubStatus", getSubStatus());
		attributes.put("Address", getAddress());
		attributes.put("Contact", getContact());
		attributes.put("Tel", getTel());
		attributes.put("Fax", getFax());
		attributes.put("Email", getEmail());
		attributes.put("Website", getWebsite());
		attributes.put("scope", getScope());
		attributes.put("OfficerInCharge", getOfficerInCharge());
		attributes.put("TelephoneNo", getTelephoneNo());
		attributes.put("EmailOfficeIncharge", getEmailOfficeIncharge());
		attributes.put("StandardsUsed", getStandardsUsed());

		return attributes;
	}

	@Override
	public void setModelAttributes(Map<String, Object> attributes) {
		Long SammNo = (Long)attributes.get("SammNo");

		if (SammNo != null) {
			setSammNo(SammNo);
		}

		String OrganizationName = (String)attributes.get("OrganizationName");

		if (OrganizationName != null) {
			setOrganizationName(OrganizationName);
		}

		String Field = (String)attributes.get("Field");

		if (Field != null) {
			setField(Field);
		}

		String type_ = (String)attributes.get("type_");

		if (type_ != null) {
			setType_(type_);
		}

		String Program = (String)attributes.get("Program");

		if (Program != null) {
			setProgram(Program);
		}

		String Status = (String)attributes.get("Status");

		if (Status != null) {
			setStatus(Status);
		}

		String SubStatus = (String)attributes.get("SubStatus");

		if (SubStatus != null) {
			setSubStatus(SubStatus);
		}

		String Address = (String)attributes.get("Address");

		if (Address != null) {
			setAddress(Address);
		}

		String Contact = (String)attributes.get("Contact");

		if (Contact != null) {
			setContact(Contact);
		}

		Long Tel = (Long)attributes.get("Tel");

		if (Tel != null) {
			setTel(Tel);
		}

		Long Fax = (Long)attributes.get("Fax");

		if (Fax != null) {
			setFax(Fax);
		}

		String Email = (String)attributes.get("Email");

		if (Email != null) {
			setEmail(Email);
		}

		String Website = (String)attributes.get("Website");

		if (Website != null) {
			setWebsite(Website);
		}

		String scope = (String)attributes.get("scope");

		if (scope != null) {
			setScope(scope);
		}

		String OfficerInCharge = (String)attributes.get("OfficerInCharge");

		if (OfficerInCharge != null) {
			setOfficerInCharge(OfficerInCharge);
		}

		Long TelephoneNo = (Long)attributes.get("TelephoneNo");

		if (TelephoneNo != null) {
			setTelephoneNo(TelephoneNo);
		}

		String EmailOfficeIncharge = (String)attributes.get(
				"EmailOfficeIncharge");

		if (EmailOfficeIncharge != null) {
			setEmailOfficeIncharge(EmailOfficeIncharge);
		}

		String StandardsUsed = (String)attributes.get("StandardsUsed");

		if (StandardsUsed != null) {
			setStandardsUsed(StandardsUsed);
		}
	}

	@JSON
	public long getSammNo() {
		return _SammNo;
	}

	public void setSammNo(long SammNo) {
		_SammNo = SammNo;
	}

	@JSON
	public String getOrganizationName() {
		if (_OrganizationName == null) {
			return StringPool.BLANK;
		}
		else {
			return _OrganizationName;
		}
	}

	public void setOrganizationName(String OrganizationName) {
		_columnBitmask |= ORGANIZATIONNAME_COLUMN_BITMASK;

		if (_originalOrganizationName == null) {
			_originalOrganizationName = _OrganizationName;
		}

		_OrganizationName = OrganizationName;
	}

	public String getOriginalOrganizationName() {
		return GetterUtil.getString(_originalOrganizationName);
	}

	@JSON
	public String getField() {
		if (_Field == null) {
			return StringPool.BLANK;
		}
		else {
			return _Field;
		}
	}

	public void setField(String Field) {
		_columnBitmask |= FIELD_COLUMN_BITMASK;

		if (_originalField == null) {
			_originalField = _Field;
		}

		_Field = Field;
	}

	public String getOriginalField() {
		return GetterUtil.getString(_originalField);
	}

	@JSON
	public String getType_() {
		if (_type_ == null) {
			return StringPool.BLANK;
		}
		else {
			return _type_;
		}
	}

	public void setType_(String type_) {
		_type_ = type_;
	}

	@JSON
	public String getProgram() {
		if (_Program == null) {
			return StringPool.BLANK;
		}
		else {
			return _Program;
		}
	}

	public void setProgram(String Program) {
		_Program = Program;
	}

	@JSON
	public String getStatus() {
		if (_Status == null) {
			return StringPool.BLANK;
		}
		else {
			return _Status;
		}
	}

	public void setStatus(String Status) {
		_Status = Status;
	}

	@JSON
	public String getSubStatus() {
		if (_SubStatus == null) {
			return StringPool.BLANK;
		}
		else {
			return _SubStatus;
		}
	}

	public void setSubStatus(String SubStatus) {
		_SubStatus = SubStatus;
	}

	@JSON
	public String getAddress() {
		if (_Address == null) {
			return StringPool.BLANK;
		}
		else {
			return _Address;
		}
	}

	public void setAddress(String Address) {
		_Address = Address;
	}

	@JSON
	public String getContact() {
		if (_Contact == null) {
			return StringPool.BLANK;
		}
		else {
			return _Contact;
		}
	}

	public void setContact(String Contact) {
		_Contact = Contact;
	}

	@JSON
	public long getTel() {
		return _Tel;
	}

	public void setTel(long Tel) {
		_Tel = Tel;
	}

	@JSON
	public long getFax() {
		return _Fax;
	}

	public void setFax(long Fax) {
		_Fax = Fax;
	}

	@JSON
	public String getEmail() {
		if (_Email == null) {
			return StringPool.BLANK;
		}
		else {
			return _Email;
		}
	}

	public void setEmail(String Email) {
		_Email = Email;
	}

	@JSON
	public String getWebsite() {
		if (_Website == null) {
			return StringPool.BLANK;
		}
		else {
			return _Website;
		}
	}

	public void setWebsite(String Website) {
		_Website = Website;
	}

	@JSON
	public String getScope() {
		if (_scope == null) {
			return StringPool.BLANK;
		}
		else {
			return _scope;
		}
	}

	public void setScope(String scope) {
		_scope = scope;
	}

	@JSON
	public String getOfficerInCharge() {
		if (_OfficerInCharge == null) {
			return StringPool.BLANK;
		}
		else {
			return _OfficerInCharge;
		}
	}

	public void setOfficerInCharge(String OfficerInCharge) {
		_OfficerInCharge = OfficerInCharge;
	}

	@JSON
	public long getTelephoneNo() {
		return _TelephoneNo;
	}

	public void setTelephoneNo(long TelephoneNo) {
		_TelephoneNo = TelephoneNo;
	}

	@JSON
	public String getEmailOfficeIncharge() {
		if (_EmailOfficeIncharge == null) {
			return StringPool.BLANK;
		}
		else {
			return _EmailOfficeIncharge;
		}
	}

	public void setEmailOfficeIncharge(String EmailOfficeIncharge) {
		_EmailOfficeIncharge = EmailOfficeIncharge;
	}

	@JSON
	public String getStandardsUsed() {
		if (_StandardsUsed == null) {
			return StringPool.BLANK;
		}
		else {
			return _StandardsUsed;
		}
	}

	public void setStandardsUsed(String StandardsUsed) {
		_StandardsUsed = StandardsUsed;
	}

	public long getColumnBitmask() {
		return _columnBitmask;
	}

	@Override
	public ExpandoBridge getExpandoBridge() {
		return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
			CABDirectories_Metadata.class.getName(), getPrimaryKey());
	}

	@Override
	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
		ExpandoBridge expandoBridge = getExpandoBridge();

		expandoBridge.setAttributes(serviceContext);
	}

	@Override
	public CABDirectories_Metadata toEscapedModel() {
		if (_escapedModel == null) {
			_escapedModel = (CABDirectories_Metadata)ProxyUtil.newProxyInstance(_classLoader,
					_escapedModelInterfaces, new AutoEscapeBeanHandler(this));
		}

		return _escapedModel;
	}

	public CABDirectories_Metadata toUnescapedModel() {
		return (CABDirectories_Metadata)this;
	}

	@Override
	public Object clone() {
		CABDirectories_MetadataImpl cabDirectories_MetadataImpl = new CABDirectories_MetadataImpl();

		cabDirectories_MetadataImpl.setSammNo(getSammNo());
		cabDirectories_MetadataImpl.setOrganizationName(getOrganizationName());
		cabDirectories_MetadataImpl.setField(getField());
		cabDirectories_MetadataImpl.setType_(getType_());
		cabDirectories_MetadataImpl.setProgram(getProgram());
		cabDirectories_MetadataImpl.setStatus(getStatus());
		cabDirectories_MetadataImpl.setSubStatus(getSubStatus());
		cabDirectories_MetadataImpl.setAddress(getAddress());
		cabDirectories_MetadataImpl.setContact(getContact());
		cabDirectories_MetadataImpl.setTel(getTel());
		cabDirectories_MetadataImpl.setFax(getFax());
		cabDirectories_MetadataImpl.setEmail(getEmail());
		cabDirectories_MetadataImpl.setWebsite(getWebsite());
		cabDirectories_MetadataImpl.setScope(getScope());
		cabDirectories_MetadataImpl.setOfficerInCharge(getOfficerInCharge());
		cabDirectories_MetadataImpl.setTelephoneNo(getTelephoneNo());
		cabDirectories_MetadataImpl.setEmailOfficeIncharge(getEmailOfficeIncharge());
		cabDirectories_MetadataImpl.setStandardsUsed(getStandardsUsed());

		cabDirectories_MetadataImpl.resetOriginalValues();

		return cabDirectories_MetadataImpl;
	}

	public int compareTo(CABDirectories_Metadata cabDirectories_Metadata) {
		long primaryKey = cabDirectories_Metadata.getPrimaryKey();

		if (getPrimaryKey() < primaryKey) {
			return -1;
		}
		else if (getPrimaryKey() > primaryKey) {
			return 1;
		}
		else {
			return 0;
		}
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}

		if (!(obj instanceof CABDirectories_Metadata)) {
			return false;
		}

		CABDirectories_Metadata cabDirectories_Metadata = (CABDirectories_Metadata)obj;

		long primaryKey = cabDirectories_Metadata.getPrimaryKey();

		if (getPrimaryKey() == primaryKey) {
			return true;
		}
		else {
			return false;
		}
	}

	@Override
	public int hashCode() {
		return (int)getPrimaryKey();
	}

	@Override
	public void resetOriginalValues() {
		CABDirectories_MetadataModelImpl cabDirectories_MetadataModelImpl = this;

		cabDirectories_MetadataModelImpl._originalOrganizationName = cabDirectories_MetadataModelImpl._OrganizationName;

		cabDirectories_MetadataModelImpl._originalField = cabDirectories_MetadataModelImpl._Field;

		cabDirectories_MetadataModelImpl._columnBitmask = 0;
	}

	@Override
	public CacheModel<CABDirectories_Metadata> toCacheModel() {
		CABDirectories_MetadataCacheModel cabDirectories_MetadataCacheModel = new CABDirectories_MetadataCacheModel();

		cabDirectories_MetadataCacheModel.SammNo = getSammNo();

		cabDirectories_MetadataCacheModel.OrganizationName = getOrganizationName();

		String OrganizationName = cabDirectories_MetadataCacheModel.OrganizationName;

		if ((OrganizationName != null) && (OrganizationName.length() == 0)) {
			cabDirectories_MetadataCacheModel.OrganizationName = null;
		}

		cabDirectories_MetadataCacheModel.Field = getField();

		String Field = cabDirectories_MetadataCacheModel.Field;

		if ((Field != null) && (Field.length() == 0)) {
			cabDirectories_MetadataCacheModel.Field = null;
		}

		cabDirectories_MetadataCacheModel.type_ = getType_();

		String type_ = cabDirectories_MetadataCacheModel.type_;

		if ((type_ != null) && (type_.length() == 0)) {
			cabDirectories_MetadataCacheModel.type_ = null;
		}

		cabDirectories_MetadataCacheModel.Program = getProgram();

		String Program = cabDirectories_MetadataCacheModel.Program;

		if ((Program != null) && (Program.length() == 0)) {
			cabDirectories_MetadataCacheModel.Program = null;
		}

		cabDirectories_MetadataCacheModel.Status = getStatus();

		String Status = cabDirectories_MetadataCacheModel.Status;

		if ((Status != null) && (Status.length() == 0)) {
			cabDirectories_MetadataCacheModel.Status = null;
		}

		cabDirectories_MetadataCacheModel.SubStatus = getSubStatus();

		String SubStatus = cabDirectories_MetadataCacheModel.SubStatus;

		if ((SubStatus != null) && (SubStatus.length() == 0)) {
			cabDirectories_MetadataCacheModel.SubStatus = null;
		}

		cabDirectories_MetadataCacheModel.Address = getAddress();

		String Address = cabDirectories_MetadataCacheModel.Address;

		if ((Address != null) && (Address.length() == 0)) {
			cabDirectories_MetadataCacheModel.Address = null;
		}

		cabDirectories_MetadataCacheModel.Contact = getContact();

		String Contact = cabDirectories_MetadataCacheModel.Contact;

		if ((Contact != null) && (Contact.length() == 0)) {
			cabDirectories_MetadataCacheModel.Contact = null;
		}

		cabDirectories_MetadataCacheModel.Tel = getTel();

		cabDirectories_MetadataCacheModel.Fax = getFax();

		cabDirectories_MetadataCacheModel.Email = getEmail();

		String Email = cabDirectories_MetadataCacheModel.Email;

		if ((Email != null) && (Email.length() == 0)) {
			cabDirectories_MetadataCacheModel.Email = null;
		}

		cabDirectories_MetadataCacheModel.Website = getWebsite();

		String Website = cabDirectories_MetadataCacheModel.Website;

		if ((Website != null) && (Website.length() == 0)) {
			cabDirectories_MetadataCacheModel.Website = null;
		}

		cabDirectories_MetadataCacheModel.scope = getScope();

		String scope = cabDirectories_MetadataCacheModel.scope;

		if ((scope != null) && (scope.length() == 0)) {
			cabDirectories_MetadataCacheModel.scope = null;
		}

		cabDirectories_MetadataCacheModel.OfficerInCharge = getOfficerInCharge();

		String OfficerInCharge = cabDirectories_MetadataCacheModel.OfficerInCharge;

		if ((OfficerInCharge != null) && (OfficerInCharge.length() == 0)) {
			cabDirectories_MetadataCacheModel.OfficerInCharge = null;
		}

		cabDirectories_MetadataCacheModel.TelephoneNo = getTelephoneNo();

		cabDirectories_MetadataCacheModel.EmailOfficeIncharge = getEmailOfficeIncharge();

		String EmailOfficeIncharge = cabDirectories_MetadataCacheModel.EmailOfficeIncharge;

		if ((EmailOfficeIncharge != null) &&
				(EmailOfficeIncharge.length() == 0)) {
			cabDirectories_MetadataCacheModel.EmailOfficeIncharge = null;
		}

		cabDirectories_MetadataCacheModel.StandardsUsed = getStandardsUsed();

		String StandardsUsed = cabDirectories_MetadataCacheModel.StandardsUsed;

		if ((StandardsUsed != null) && (StandardsUsed.length() == 0)) {
			cabDirectories_MetadataCacheModel.StandardsUsed = null;
		}

		return cabDirectories_MetadataCacheModel;
	}

	@Override
	public String toString() {
		StringBundler sb = new StringBundler(37);

		sb.append("{SammNo=");
		sb.append(getSammNo());
		sb.append(", OrganizationName=");
		sb.append(getOrganizationName());
		sb.append(", Field=");
		sb.append(getField());
		sb.append(", type_=");
		sb.append(getType_());
		sb.append(", Program=");
		sb.append(getProgram());
		sb.append(", Status=");
		sb.append(getStatus());
		sb.append(", SubStatus=");
		sb.append(getSubStatus());
		sb.append(", Address=");
		sb.append(getAddress());
		sb.append(", Contact=");
		sb.append(getContact());
		sb.append(", Tel=");
		sb.append(getTel());
		sb.append(", Fax=");
		sb.append(getFax());
		sb.append(", Email=");
		sb.append(getEmail());
		sb.append(", Website=");
		sb.append(getWebsite());
		sb.append(", scope=");
		sb.append(getScope());
		sb.append(", OfficerInCharge=");
		sb.append(getOfficerInCharge());
		sb.append(", TelephoneNo=");
		sb.append(getTelephoneNo());
		sb.append(", EmailOfficeIncharge=");
		sb.append(getEmailOfficeIncharge());
		sb.append(", StandardsUsed=");
		sb.append(getStandardsUsed());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(58);

		sb.append("<model><model-name>");
		sb.append("com.skali.cabdirectories.model.CABDirectories_Metadata");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>SammNo</column-name><column-value><![CDATA[");
		sb.append(getSammNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>OrganizationName</column-name><column-value><![CDATA[");
		sb.append(getOrganizationName());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Field</column-name><column-value><![CDATA[");
		sb.append(getField());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>type_</column-name><column-value><![CDATA[");
		sb.append(getType_());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Program</column-name><column-value><![CDATA[");
		sb.append(getProgram());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Status</column-name><column-value><![CDATA[");
		sb.append(getStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>SubStatus</column-name><column-value><![CDATA[");
		sb.append(getSubStatus());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Address</column-name><column-value><![CDATA[");
		sb.append(getAddress());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Contact</column-name><column-value><![CDATA[");
		sb.append(getContact());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Tel</column-name><column-value><![CDATA[");
		sb.append(getTel());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Fax</column-name><column-value><![CDATA[");
		sb.append(getFax());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Email</column-name><column-value><![CDATA[");
		sb.append(getEmail());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>Website</column-name><column-value><![CDATA[");
		sb.append(getWebsite());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>scope</column-name><column-value><![CDATA[");
		sb.append(getScope());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>OfficerInCharge</column-name><column-value><![CDATA[");
		sb.append(getOfficerInCharge());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>TelephoneNo</column-name><column-value><![CDATA[");
		sb.append(getTelephoneNo());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>EmailOfficeIncharge</column-name><column-value><![CDATA[");
		sb.append(getEmailOfficeIncharge());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>StandardsUsed</column-name><column-value><![CDATA[");
		sb.append(getStandardsUsed());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private static ClassLoader _classLoader = CABDirectories_Metadata.class.getClassLoader();
	private static Class<?>[] _escapedModelInterfaces = new Class[] {
			CABDirectories_Metadata.class
		};
	private long _SammNo;
	private String _OrganizationName;
	private String _originalOrganizationName;
	private String _Field;
	private String _originalField;
	private String _type_;
	private String _Program;
	private String _Status;
	private String _SubStatus;
	private String _Address;
	private String _Contact;
	private long _Tel;
	private long _Fax;
	private String _Email;
	private String _Website;
	private String _scope;
	private String _OfficerInCharge;
	private long _TelephoneNo;
	private String _EmailOfficeIncharge;
	private String _StandardsUsed;
	private long _columnBitmask;
	private CABDirectories_Metadata _escapedModel;
}